<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js</title>
	<script>
		window.onload=function (argument) {
			var otxt=document.getElementById('text')
			document.onmousemove=function getxy(event) {
				otxt.value='x坐标'+event.clientX+','+'y坐标'+event.clientY;
			}
		}
	</script>
</head>
<body>
	<input type="text"id="text">
	<div >screenX和clientX区别，要注意。</div>
</body>
</html>